#ifndef PARTICLE_H_
#define PARTICLE_H_

// By: Jesse Guarascia de Urena
// Particle class
// Used by the particle effect class

#include "Rect.h"
#include "Randomizer.h"
#include "TryneTimer.h"

class Particle
{
private:
	float angle; // Angle the particle uses
	float velocity; // Velocity of the particle
	int lifeTime; // Life time of the particle
	Rect pos; // Particle's rectangle

	bool exists; // W-o-N the particle still exists

	TryneTimer timer; // Timer to tell how long the timer's been alive

public:
	Particle(void);
	~Particle(void);

	// Begin the particle's life
	void Start(float baseAngle, float spread);

	// Update the particle
	void Update();

	// Get/Set components of the particle
	inline float Angle() { return angle; }
	inline void SetAngle(float _angle) { angle = _angle; }

	inline float Velocity() { return velocity; }
	inline void SetVelocity(float vel) { velocity = vel; }

	inline bool Exists() { return exists; }
	inline void SetExists(bool _exists) { exists = _exists; }

	inline int LifeTime() { return lifeTime;}
	inline void SetLifeTime(int lfTime) { lifeTime = lfTime; }

	inline Rect &Pos() { return pos; }
};

#endif // PARTICLE_H_
